package com.weihui.jxc.model;

import java.util.Date;

import com.weihui.jxc.common.ValidationManager;

/**
 * 入库查询对应虚拟表的扩展类
 * 
 * @author xiaowei
 *
 */
public class InAnOutInfo extends InAndOut {
	private String goodsName;// 商品名称
	private String providerName;// 供应商名字
	private Date startTime;//开始时间
	private Date endTime;//结束时间

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public String getProviderName() {
		return providerName;
	}

	public void setProviderName(String providerName) {
		this.providerName = providerName;
	}
	
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	/**
	 * 表格数据匹配
	 */
	@Override
	public Object getValue(Integer columnNumber) {
		switch (columnNumber) {
		case 0:// "入库单号"

			return ValidationManager.changeNull(getId());
		case 1:// "商品名称"

			return ValidationManager.changeNull(getGoodsName());
		case 2:// 商品数量

			return ValidationManager.changeNull(getNumber());
		case 3:// 合计金额

			return ValidationManager.changeNull(getPrice());
		case 4:// 供应商名称

			return ValidationManager.changeNull(getProviderName());

		case 5:// 验收结论

			return ValidationManager.changeNull(getComment());
		case 6:// 入库时间

			return ValidationManager.changeNull(getInporttime());
		case 7:// 经手人

			return ValidationManager.changeNull(getSponsor());
		case 8:// 支付方式

			return ValidationManager.changeNull(getPaytype());
		case 9:// 操作人员

			return ValidationManager.changeNull(getOperateperson());

		default:
			return ValidationManager.changeNull("");
		}
	}
}